#include <stdio.h>

int main() 
{
    int n=0;
    while (scanf("%d", &n) != EOF)
      { 
        int i = 0;
        int a =1;
        int b =2;
        int c =0; 
        if(n>2)
    {
        for(i=1;i<=n-2;i++)
        {
          c =a+b;
          a = b;
          b= c ;
        }
         printf("%d\n", c);
    }
     else
 {
          printf("%d\n",n);
 }
      }
    return 0;
}